<?php

use App\Admin\Controllers\Aliyun\AliyunController;
use App\Admin\Controllers\Aliyun\CdnController;
use App\Admin\Controllers\Aliyun\DcdnController;
use App\Admin\Controllers\Aliyun\DnsController;
use App\Admin\Controllers\Aliyun\DomainController;
use App\Admin\Controllers\Aliyun\OssController;
use App\Admin\Controllers\Aliyun\PoolController;
use App\Admin\Controllers\Aliyun\SslController;
use App\Admin\Controllers\Aliyun\VersionController;

# 云账户下的域名列表
Route::get('aliyun/{aliyun}/domains', [DomainController::class, 'index'])
    ->name('aliyun.domains.index');
Route::resource('aliyun.cdn', CdnController::class);
Route::resource('aliyun.dcdn', DcdnController::class);
Route::resource('aliyun.domains.dns', DnsController::class);

# 云账户
Route::resource('aliyun', AliyunController::class);

# 获取云账户下的OSS-bucket列表
Route::get('oss/buckets', [OssController::class, 'buckets'])
    ->name('oss.buckets');
Route::resource('oss', OssController::class);
Route::resource('versions', VersionController::class);
Route::get('versions/{version}/logs', [VersionController::class, 'logs'])
    ->name('versions.logs');

Route::get('pools/domains', [PoolController::class, 'domains'])
    ->name('pools.domains');
Route::resource('pools', PoolController::class);

Route::resource('ssl', SslController::class);
